package wei.qiang.ye.rabbitmqdemo.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "hello")  //监听队列，处理消息
public class HelloReceiver {

    @RabbitHandler
    public void process(String context){
        System.out.println("Receiver1 : " + context);
    }
}

